package com.itheima.test;
//类的组成：属性和行为
public class Hero {
    //属性 名字 血量 蓝
     String name;
     int red;
     int blue;
    //无参构造
    public Hero() {
    }

    //全参构造
    public Hero(String name, int red, int blue) {
        this.name = name;
        this.red = red;
        this.blue = blue;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getRed() {
        return red;
    }

    public void setRed(int red) {
        this.red = red;
    }

    public int getBlue() {
        return blue;
    }

    public void setBlue(int blue) {
        this.blue = blue;
    }

    @Override
    public String toString() {
        return "Hero{" +
                "name='" + name + '\'' +
                ", red=" + red +
                ", blue=" + blue +
                '}';
    }

    //行为 释放技能
    public  void jn( ) {
        System.out.println("释放技能");
    }


}
